home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 June / SGI Freeware 1998 June.iso / dist / fw_bind.idb / usr / freeware / catman / u_man / cat1 / host.1.z / host.1
Text File  |  1998-05-26  |  10KB  |  177 lines

  1. HOST(1)                      BSD Reference Manual                      HOST(1)
  2.  
  3. NNAAMMEE
  4.      hhoosstt - look up host names using domain server
  5.  
  6. SSYYNNOOPPSSIISS
  7.      hhoosstt [--ll] [--vv] [--ww] [--rr] [--dd] [--tt _q_u_e_r_y_t_y_p_e] [--aa] _h_o_s_t [_s_e_r_v_e_r]
  8.  
  9. DDEESSCCRRIIPPTTIIOONN
  10.      HHoosstt looks for information about Internet hosts.  It gets this informa-
  11.      tion from a set of interconnected servers that are spread across the
  12.      country.  By default, it simply converts between host names and Internet
  13.      addresses.  However, with the ``--tt'' or ``--aa'' options, it can be used to
  14.      find all of the information about this host that is maintained by the do-
  15.      main server.
  16.  
  17.      The arguments can be either host names or host numbers.  The program
  18.      first attempts to interpret them as host numbers.  If this fails, it will
  19.      treat them as host names.  A host number consists of first decimal num-
  20.      bers separated by dots, e.g. 128.6.4.194 A host name consists of names
  21.      separated by dots, e.g. topaz.rutgers.edu.  Unless the name ends in a
  22.      dot, the local domain is automatically tacked on the end.  Thus, a Rut-
  23.      gers user can say
  24.  
  25.            hhoosstt ttooppaazz
  26.  
  27.      and it will actually look up "topaz.rutgers.edu".  If this fails, the
  28.      name is tried unchanged (in this case, "topaz").  This same convention is
  29.      used for mail and other network utilities.  The actual suffix to tack on
  30.      the end is obtained by looking at the results of a hostname(1) call, and
  31.      using everything starting at the first dot.  (See below for a description
  32.      of _C_U_S_T_O_M_I_Z_I_N_G _H_O_S_T _N_A_M_E _L_O_O_K_U_P.)
  33.  
  34.      The first argument is the host name you want to look up.  If this is a
  35.      number, an ``inverse query'' is done, i.e. the domain system looks in a
  36.      separate set of databases used to convert numbers to names.
  37.  
  38.      The second argument is optional.  It allows you to specify a particular
  39.      server to query.  If you don't specify this argument, the default server
  40.      (normally the local machine) is used.
  41.  
  42.      If a name is specified, you may see output of three different kinds.
  43.      Here is an example that shows all of them:
  44.  
  45.            %% hhoosstt ssuunn44
  46.            sun4.rutgers.edu is a nickname for ATHOS.RUTGERS.EDU
  47.            ATHOS.RUTGERS.EDU has address 128.6.5.46
  48.            ATHOS.RUTGERS.EDU has address 128.6.4.4
  49.            ATHOS.RUTGERS.EDU mail is handled by ARAMIS.RUTGERS.EDU
  50.  
  51.      The user has typed the command ``hhoosstt ssuunn44''. The first line indicates
  52.      that the name ``sun4.rutgers.edu'' is actually a nickname.  The official
  53.      host name is ``ATHOS.RUTGERS.EDU''. The next two lines show the address.
  54.      If a system has more than one network interface, there will be a separate
  55.      address for each.  The last line indicates that ATHOS.RUTGERS.EDU does
  56.      not receive its own mail.  Mail for it is taken by ARAMIS.RUTGERS.EDU.
  57.      There may be more than one such line, since some systems have more than
  58.      one other system that will handle mail for them.  Technically, every sys-
  59.      tem that can receive mail is supposed to have an entry of this kind.  If
  60.      the system receives its own mail, there should be an entry the mentions
  61.      the system itself; for example,
  62.  
  63.            XXX mail is handled by XXX
  64.  
  65.  
  66.      However, many systems that receive their own mail do not bother to men-
  67.      tion that fact.  If a system has a ``mail is handled by'' entry, but no
  68.      address, this indicates that it is not really part of the Internet, but a
  69.      system that is on the network will forward mail to it.  Systems on
  70.      Usenet, Bitnet, and a number of other networks have entries of this kind.
  71.  
  72. OOPPTTIIOONNSS
  73.      There are a number of options that can be used before the host name.
  74.      Most of these options are meaningful only to the staff who have to main-
  75.      tain the domain database.
  76.  
  77.      --ww          This causes hhoosstt to wait forever for a response.  Normally it
  78.                  will time out after approximate one minute.
  79.  
  80.      --vv          Use "verbose" format for printout.  This is the official do-
  81.                  main master file format, which is documented in the man page
  82.                  for named(8).  Without this option, output still follows this
  83.                  format in general terms, but some attempt is made to make it
  84.                  more intelligible to normal users.  Without ``--vv'', any "a",
  85.                  "mx", and "cname" records are written out as "has address",
  86.                  "mail is handled by", and "is a nickname for" (respectively),
  87.                  and TTL and class fields are not shown.
  88.  
  89.      --rr          Turn off recursion in the request.  This means that the name
  90.                  server will return only data it has in its own database.  It
  91.                  will not ask other servers for more information.
  92.  
  93.      --dd          Turn on debugging.  Network transactions are shown in detail.
  94.  
  95.      --tt _q_u_e_r_y_t_y_p_e
  96.                  Allows you to specify a particular _q_u_e_r_y_t_y_p_e of information
  97.                  to be looked up.  The arguments are defined in the man page
  98.                  for named(8).  Currently-supported types include: ``aa'',
  99.                  ``nnss'', ``mmdd'', ``mmff'', ``ccnnaammee'', ``ssooaa'', ``mmbb'', ``mmgg'',
  100.                  ``mmrr'', ``nnuullll'', ``wwkkss'', ``ppttrr'', ``hhiinnffoo'', ``mmiinnffoo'',
  101.                  ``mmxx'', ``uuiinnffoo'', ``uuiidd'', ``ggiidd'', ``uunnssppeecc''. Additional-
  102.                  ly, the wildcard, which may be written as either ``aannyy'' or
  103.                  ``**'', can be used to specify any (all) of the above types.
  104.                  Types must be given in lower case.  Note that the default is
  105.                  to look first for ``aa'', and then ``mmxx'', except that if the
  106.                  verbose option is turned on, the default is only ``aa''. The
  107.                  ``--tt'' option is particularly useful for filtering informa-
  108.                  tion returned by hhoosstt; see the explanation of the ``--ll'' op-
  109.                  tion, below, for more information.
  110.  
  111.      --aa          ``all''; this is equivalent to ``--vv --tt aannyy''.
  112.  
  113.      --ll          List a complete domain; e.g.:
  114.  
  115.                        hhoosstt --ll rruuttggeerrss..eedduu
  116.  
  117.                  will give a listing of all hosts in the rutgers.edu domain.
  118.                  The ``--tt'' option is used to filter what information is pre-
  119.                  sented, as you would expect.  The default is address informa-
  120.                  tion, which also include PTR and NS records.  The command
  121.  
  122.                        hhoosstt --ll --vv --tt aannyy rruuttggeerrss..eedduu
  123.  
  124.                  will give a complete download of the zone data for rut-
  125.                  gers.edu, in the official master file format.  (However the
  126.                  SOA record is listed twice, for arcane reasons.)
  127.  
  128.                  NNOOTTEE:: ``--ll'' is implemented by doing a complete zone transfer
  129.                  and then filtering out the information the you have asked
  130.                  for.  This command should be used only if it is absolutely
  131.                  necessary.
  132.  
  133. CCUUSSTTOOMMIIZZIINNGG HHOOSSTT NNAAMMEE LLOOOOKKUUPP
  134.      In general, if the name supplied by the user does not have any dots in
  135.      it, a default domain is appended to the end.  This domain can be defined
  136.      in _/_e_t_c_/_r_e_s_o_l_v_._c_o_n_f, but is normally derived by taking the local hostname
  137.      after its first dot.  The user can override this, and specify a different
  138.      default domain, using the environment variable LOCALDOMAIN. In addition,
  139.      the user can supply his own abbreviations for host names.  They should be
  140.      in a file consisting of one line per abbreviation.  Each line contains an
  141.      abbreviation, a space, and then the full host name.  The name file must
  142.      be contained in the HOSTALIASES environment variable.
  143.  
  144. EENNVVIIRROONNMMEENNTT
  145.      HOSTALIASES         Name of file containing (_h_o_s_t _a_l_i_a_s, _f_u_l_l _h_o_s_t_n_a_m_e)
  146.                          pairs.
  147.  
  148. FFIILLEESS
  149.      /etc/resolv.conf    See resolver(5).
  150.  
  151.      HOSTALIASES         Name of file containing (_h_o_s_t _a_l_i_a_s, _f_u_l_l _h_o_s_t_n_a_m_e)
  152.                          pairs.
  153.  
  154. SSEEEE AALLSSOO
  155.      named(8),  resolver(5).
  156.  
  157. BBUUGGSS
  158.      Unexpected effects can happen when you type a name that is not part of
  159.      the local domain.  Please always keep in mind the fact that the local do-
  160.      main name is tacked onto the end of every name, unless it ends in a dot.
  161.      Only if this fails is the name used unchanged.
  162.  
  163.      The ``--ll'' option only tries the first name server listed for the domain
  164.      that you have requested.  If this server is dead, you may need to specify
  165.      a server manually. E.g., to get a listing of foo.edu, you could try
  166.  
  167.            hhoosstt --tt nnss ffoooo..eedduu
  168.  
  169.      to get a list of all the name servers for foo.edu, and then try
  170.  
  171.            hhoosstt --ll ffoooo..eedduu xxxxxx
  172.  
  173.      for all ``xxxxxx'' on the list of name servers, until you find one that
  174.      works.
  175.  
  176. 4th Berkeley Distribution      December 15, 1994                             3
  177.